package com.qf.api.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qf.api.blog.dto.ArticleDTO;
import com.qf.api.blog.entity.ArticleEntity;
import com.qf.api.blog.vo.ArticleDetailVO;
import com.qf.api.blog.vo.ArticlePageVO;
import com.qf.api.front.dto.ArticleContent;
import com.qf.api.front.vo.ArticleVO;

import java.util.List;

/**
* @author sin
* @description 针对表【t_article(文章表)】的数据库操作Service
* @createDate 2025-05-23 13:27:40
*/
public interface ArticleService extends IService<ArticleEntity> {

    List<ArticlePageVO> getArticlePage(Integer tagId, Integer categoryId, String articleTitle, Integer isTop, Integer status);

    Boolean publishArticle(ArticleDTO articleDTO);

    Boolean updateArticle(Long id, ArticleDTO articleDTO);

    Boolean deleteArticleById(Long id);

    Boolean updateArticleStatus(Long articleId, Integer type, Integer value);

    ArticleDTO getArticleById(Long id);

    /**
     * 通过title判断标题是否重复
     **/
    Boolean checkArticleTitle(String title);

    long getWordCount();

    List<ArticleVO> getPageArticle(String title,Long tagId, Long categoryId);

    ArticleContent getArticleContent(Long articleId);

    void addArticleVisitTime(String ip, Long articleId);
}
